The size aspect of a shape on the screen is a combination of two things: the number of pixels used to define the shape, and the enlargement factor.

The number of pixels used to define a shape is defined in the Shape Editor. The original castle shape, for example, has a lot more pixels than the heart shape.

The enlargement factor refers to the input of setsize. Setsize 40 is called "normal size." Setsize's input can be between 5 and 150.

This error occurred because of a combination of these two factors. In other words, setsize 150 can be a valid command if the turtle has a 40 by 40 pixel shape, but will cause an error if the shape definition is 200 by 200 pixels.

Use a smaller shape size or use a shape that is smaller in terms of number of pixels used to define it.